<nz-sider [nzWidth]="300" class='sider'>

  <app-sider-contextmenu
    [currentList]="contextmenuItem"
    [visible]="contextmenuVisible"
    [x]="contextmenuX"
    [y]="contextmenuY"></app-sider-contextmenu>

  <app-sider-user></app-sider-user>

  <ul nz-menu>
    <li nz-menu-item [nzSelected]="'/my-day' === currentUrl">
      <a routerLink='/my-day' routerLinkActive="active">
        <div class="section">
          <span class="nav-text">
            <object class="icon" data="../../assets/imgs/my_day.svg"></object>
            我的一天
          </span>
          <span class="nav-number">{{unFinish}}</span>
        </div>
      </a>
    </li>
    <li nz-menu-item [nzSelected]="'/lists/'+item.id === currentUrl" (contextmenu)="handleContextmenu($event, item)" *ngFor="let item of menuItems">
      <a routerLink="/lists/{{item.id}}" routerLinkActive="active">
        <div class="section">
          <span class="nav-text">
            <object *ngIf="item.icon === 'todo'" class="icon" data="../../assets/imgs/todo.svg" type=""></object>
            <object *ngIf="item.icon === 'list'" class="icon" data="../../assets/imgs/list.svg" type=""></object>
            <i *ngIf="!isDefaultIcon(item.icon)" class="emoji">{{item.icon}}</i>
            <span>{{item.title}}</span>
          </span>
          <span class="nav-number" *ngIf="item.number!=0">{{item.number}}</span>
        </div>
      </a>
    </li>
  </ul>
  <div class="newList" (click)="addList()">
    <span>
      <i class="anticon anticon-plus-circle-o"></i>
      新建清单
    </span>
  </div>

</nz-sider>
